//
//  WSBHomebannersModel.m
//  NuoMi
//
//  Created by ios on 16/1/15.
//  Copyright © 2016年 iOSwusanbao. All rights reserved.
//

#import "WSBHomepageModel.h"

@implementation WSBHomepageModel

+(NSDictionary *)JSONKeyPathsByPropertyKey {
    return @{
             @"banners":@"banners",
             @"category":@"category",
             @"special":@"special",
             @"recommend":@"recommend",
             @"topten":@"topten"
             };
}

+(NSValueTransformer *)bannersJSONTransformer {
    return [MTLJSONAdapter arrayTransformerWithModelClass:[WSBHomebannersModel class]];
}

+(NSValueTransformer *)categoryJSONTransformer {
    return [MTLJSONAdapter arrayTransformerWithModelClass:[WSBHomecategoryModel class]];
}

+(NSValueTransformer *)specialJSONTransformer {
    return [MTLJSONAdapter dictionaryTransformerWithModelClass:[WSBHomespecialModel class]];
}

+ (NSValueTransformer *)toptenJSONTransformer {
    return [MTLJSONAdapter dictionaryTransformerWithModelClass:[WSBHometoptenModel class]];
}

@end



//1
@implementation WSBHomebannersModel

+(NSDictionary *)JSONKeyPathsByPropertyKey {
    return @{
             @"banner_id":@"banner_id",
             @"picture_url":@"picture_url",
             @"goto_type":@"goto_type",
             @"cont":@"cont"
             };
}

@end


//2
@implementation WSBHomecategoryModel

+(NSDictionary *)JSONKeyPathsByPropertyKey{
    return @{
             @"category_id":@"category_id",
             @"category_name":@"category_name",
             @"category_picurl":@"category_picurl",
             @"icon_url":@"icon_url",
             @"has_icon":@"has_icon",
             
             @"schema":@"schema"
             };
}

@end

//3
@implementation WSBHomespecialModel

+(NSDictionary *)JSONKeyPathsByPropertyKey {
    return @{
             @"block_1":@"block_1",
             @"block_2":@"block_2",
             @"block_3":@"block_3"
             };
}

@end


//4
@implementation WSBHometoptenModel

+(NSDictionary *)JSONKeyPathsByPropertyKey {
    return @{
             @"activetime":@"activetime",
             @"list":@"list",
             @"isLogo":@"isLogo",
             @"target_url":@"target_url"
             };
}

@end

